<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>
<%@ page import="javax.portlet.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.x4ee.soa.portal.framework.tools.ConfigUtils"%>
<%@ page import="cn.com.chinasoa.cms.portlet.action.*"%>

<%String contextPath = request.getContextPath();%>
<portlet:defineObjects />
<table border="0" cellspacing="2" cellpadding="2">
  <tr height="30">
    <th height="40" colspan="3" align="left"><img src="<%=contextPath%><%=ConfigUtils.getResourceBasePath(renderRequest)%>/image/URI.gif"/></th>
  </tr>
  <tr align="left">
    <th>URI</th>
    <th>Path</th>
    <th>Delete</th>
  </tr>
  <%Object uriMapObj = renderRequest.getPortletSession().getAttribute(FrameworkConfigWraper.FRAMEWORK_URI_MAP);
  	if((uriMapObj!=null)&&(uriMapObj instanceof Map)){
  		Map uriMap = (Map)uriMapObj;
		for(Iterator rIt = uriMap.keySet().iterator();rIt.hasNext();){
			Object keyObj = rIt.next();
			if((keyObj!=null)&&(keyObj instanceof String)){
				String key = (String)keyObj;
				Object valueObj = uriMap.get(keyObj);
				if((valueObj!=null)&&(valueObj instanceof String)){
					String value = (String)valueObj;%>
		  <tr class="tr-light">
		    <td><%=key%></td>
		    <td><a href='<portlet:actionURL><portlet:param name="frameworkUri" value="uriDownAction"/><portlet:param name="frameworkUrn" value="<%=key%>"/></portlet:actionURL>'><%=value%></a></td>	    
		    <td><a href='<portlet:actionURL><portlet:param name="frameworkUri" value="uriDeleteAction"/><portlet:param name="frameworkUrn" value="<%=key%>"/></portlet:actionURL>'>
		    <img border="0" src="<%=contextPath%><%=ConfigUtils.getResourceBasePath(renderRequest)%>/image/del.gif"/></a></td>
		  </tr><%}}}}%>
  <tr class="tr-light">
    <td height="40" colspan="4">
    	<a href='<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="URICreate"/></portlet:renderURL>'>
	    	<img border='0' src="<%=contextPath%><%=ConfigUtils.getResourceBasePath(renderRequest)%>/image/add.jpg"/>
    	</a>
    </td>
  </tr>
	  <tr class="tr-light">
	    <td height="40" colspan="4">
	    	<a href="<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="URITable"/></portlet:renderURL>">[URITable]</a>
	    	<a href="<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="OutletTable"/></portlet:renderURL>">[OutletTable]</a>
	    	<a href="<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="URICreate"/></portlet:renderURL>">[URICreate]</a>
			<a href="<portlet:renderURL portletMode="EDIT"><portlet:param name="frameworkUri" value="OutletCreate"/></portlet:renderURL>">[OutletCreate]</a>    	
	    </td>
	  </tr>  
</table>